// The payment page
// ================

define(['zepto', 'utils', 'sui'], function($, utils) {
  return {

    init: function(data) {
      
      this.orderId = parseInt(data.orderId)
      this.onAliBtnClick()
    },
    
    /**
     * Bind handler on clicking ali payment button
     */
    onAliBtnClick: function(orderId) {
      var that = this
      $('#ali-pay').on("click", function(e) {
        e.preventDefault()
        that.requestAliPay();
      }) 
    },

    /**
     * Request server to prepare AliWap payment data
     */
    requestAliPay: function() {
      $.showPreloader('正在提交支付数据')
      $("form").submit();
    }
  }
})